home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Interactive 7
/
PC World Interactive 7.iso
/
program
/
vbkontrol.exe
/
UNDOCFCT.ZIP
/
UNDOCFCT.DOC
next >
Wrap
Text File
|
1996-11-24
|
5KB
|
130 lines
UNDOCFCT 1.0 - Print undocumented Windows/3 calls.
Copyright D.J. Murdoch, 1991
Syntax: UNDOCFCT filename [/A]
will list all undocumented entry points and external references in a
Win/3 executable.
Options: /A - list all entries & references, documented or not.
/V - verbose mode; list location of every use of undocumented
calls, and list (undocumented) entry points in current file.
Examples:
undocfct undocfct
- Shows the three undocumented function calls that Turbo Pascal for
Windows put into this program
undocfct undocfct /a /v
- Shows a very long list of entry points for every routine in this
program, and all calls to Windows services, documented or not.
undocfct krnl386 /v
- Shows the undocumented entry points in the Windows kernel.
Description:
Many of the services that Windows 3.0 provides are undocumented,
because Microsoft wants to limit their use. This may be so that they
are free to change them in future releases; once an interface comes
into widespread use it's very unpopular to change it. It may also help
to protect the integrity of Windows if certain services are never used
except under very controlled conditions.
This program is designed to examine executables, in order to see if
and how they're "breaking the rules" by using undocumented services. I
can see two reasons to do this: to see how someone has achieved the
seemingly impossible, and to identify programs that are likely to
break when the next release of Windows comes along.
Note: UNDOCFCT will run both as a DOS application from the command
line, and as a Windows application in Windows/3. As a DOS application,
output may be redirected to a file.
What is "undocumented"?
The definition UNDOCFCT uses is very simple. If a function is listed
in the version of WINDOWS.H that was distributed with Turbo Pascal for
Windows, then the function is documented. Otherwise, it's
undocumented. This definition is a little too restrictive; some things
are documented elsewhere, so you're likely to see a few "undocumented"
references in just about every executable.
If you find this unacceptable, the easiest thing to do is to get the
source code (see below) and modify it. You might also choose to patch
UNDOCFCT.EXE; to do that, look for records of the form
modulename : string[8]; { Counted string: 1 length byte, 8 chars }
documented : set of 0..511; { 64 byte bitmap for indices 0..511 }
Remember to patch both the DOS copy and the Windows copy of the
record, and don't touch the fields in between these records.
Bugs and Warnings:
External names of entry points are only given if the reference is by
name, or if UNDOCFCT can find the referenced module as
'modulename.EXE' or 'modulename.DLL' in the current directory, on
the path, or on a path given in an environment variable named
UNDOCFCT.
If there are more than 512 entry points in a module, all but the first
512 will be treated as undocumented, and will show up multiple times.
External references by name rather than by index suffer from the same
bug.
References are shown in the order they're encountered in the fixup
list in the file, not necessarily in any sort of natural order.
If UNDOCFCT runs out of memory, it will probably die horribly, and may
crash your system. I've run it in 100K with no trouble, but the more
complicated the file, the more memory it'll use.
I wrote UNDOCFCT very quickly, and without any documentation for the
new executable format other than what I could guess for myself. It
seems to work, but there are no guarantees that it will work on
programs I haven't tried, or on hardware other than my own. Be
careful if you use it; don't trust it too much.
License:
UNDOCFCT is not a public domain program. It contains code whose
copyright belongs to D.J. Murdoch, as well as library code from
Borland International and TurboPower Software.
You are free to use UNDOCFCT without charge. You may distribute it
unmodified, together with this documentation file, provided that you
charge no more than distribution costs, and on no account more than
$10 per copy.
Source code:
UNDOCFCT is written in Turbo Pascal, and compiled in versions TP 6.0
(the DOS part) and TPW 1.0 (the Windows part). The DOS part is the
stub for the Windows part, and was attached using my GLUE utility,
since TPW doesn't offer a choice of stub.
Source code to UNDOCFCT is available at a cost of $25 (Canadian or
U.S. dollars). Send your payment to me at the address below.
Recompiling requires one or two version(s) of Turbo Pascal, and some
routines from TurboPower Software's Object Professional library.
Warranty:
There is no warranty of any kind with this program. It is
experimental software, and likely contains bugs. Use at your own
risk.
Note: This is the first public release of UNDOCFCT. Expect
bugs. If you find any, please send bug reports to me (Duncan Murdoch)
at one of the following addresses:
DJ Murdoch at Fidonet node 1:221/177.40
dmurdoch@watstat.waterloo.edu on Internet
71631,122 on Compuserve
79 John St. W
Waterloo, Ontario, Canada
N2L 1B7